{extend name="layout" /}
{block name="body"}    
  <div class="row">
    <div class="col-lg-12">
      <div class="card">
        <div class="card-body">
          
          <form action="{:url('add')}" method="post" name="add-form" class="row add-form">
            <div class="form-group col-md-12">
              <label for="group">配置分组</label>
              <div class="form-controls">
                {volist name=":config('app.site_setting.config_group')" id="group"}
                <div class="custom-control custom-radio custom-control-inline">
                  <input type="radio" class="custom-control-input" name="group" id="group{$key}" value="{$key}">
                  <label class="custom-control-label" for="group{$key}">{$group}</label>
                </div>
                {/volist}
              </div>
            </div>
            <div class="form-group col-md-12">
              <label for="type">配置类型</label>
              <div class="form-controls">
                <select class="form-control selectpicker" id="type" name="type">
                  {volist name=":config('app.site_setting.form_item_type')" id="type"}
                  <option value="{$key}">{$type}</option>
                  {/volist}
                </select>
              </div>
            </div>
            <div class="form-group col-md-12">
              <label for="title">配置名称</label>
              <input type="text" class="form-control" id="title" name="title" value="" placeholder="请输入配置名称" />
              <small class="form-text text-muted">一般由中文组成，仅用于显示</small>
            </div>
            <div class="form-group col-md-12">
              <label for="name">配置标识</label>
              <input type="text" class="form-control" id="name" name="name" value="" placeholder="请输入配置标识" />
              <small class="form-text text-muted">由英文字母和下划线组成，如 <code>web_site_title</code>，调用方法：<code>config('app.site_setting.web_site_title')</code></small>
            </div>
            <div class="form-group col-md-12">
              <label for="value">配置值</label>
              <textarea name="value" class="form-control" rows="5" id="value"></textarea>
              <small class="form-text text-muted">该配置的具体内容</small>
            </div>
            <div class="form-group col-md-12">
              <label for="options">配置可选值</label>
              <textarea name="options" class="form-control" rows="5" id="options"></textarea>
              <small class="form-text text-muted">用于单选、多选、下拉等类型</small>
            </div>
            <div class="form-group col-md-12">
              <label for="remark">配置说明</label>
              <textarea name="remark" class="form-control" rows="3" id="remark"></textarea>
              <small class="form-text text-muted">该配置的具体说明</small>
            </div>
            <div class="form-group col-md-12">
              <label for="sort">排序</label>
              <input type="text" class="form-control" id="sort" name="sort" value="10" />
            </div>
            <div class="form-group col-md-12">
              <label>状态</label>
              <div class="form-controls clearfix">
                <div class="custom-control custom-radio custom-control-inline">
                  <input type="radio" id="statusOne" name="status" class="custom-control-input" value="0">
                  <label class="custom-control-label" for="statusOne">禁用</label>
                </div>
                <div class="custom-control custom-radio custom-control-inline">
                  <input type="radio" id="statusTwo" name="status" class="custom-control-input" value="1" checked>
                  <label class="custom-control-label" for="statusTwo">启用</label>
                </div>
              </div>
            </div>
            <div class="form-group col-md-12">
              <button type="submit" class="btn btn-primary m-r-5 ajax-post" target-form="add-form">确 定</button>
              <button type="button" class="btn btn-default" onclick="javascript:history.back(-1);return false;">返 回</button>
            </div>
          </form>
 
        </div>
      </div>
    </div>
    
  </div>
{/block}